#!/bin/bash

set -euox pipefail

# Ensure the script is executed in this directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR

wmakeLnInclude src/boundaryConditions
wmakeLnInclude src/fvSchemes
wmakeLnInclude src/fsi
wmakeLnInclude src/RBFMeshMotionSolver
wmakeLnInclude src/SRFModelAbs

wmake libso src/boundaryConditions
wmake libso src/fvSchemes
wmake libso src/fsi
wmake libso src/RBFMeshMotionSolver
wmake libso src/SRFModelAbs
wmake libso src/extraSolidBodyMotion
wmake applications/utilities/addInitialRandomVelocity
cd applications/solvers/consistentSolvers
wmake all
cd -
wmake applications/solvers/unsteadyPUCoupledFoam
cd applications/solvers/fsi
wmake all
cd -
cd src/tests
wmake all
cd -
echo 'Finished'
